cantNums = 200;
cantCells = 9;
rand('seed', 86782);

u = rand(1, cantNums);

x = myDistribution(u);
% 
%squaredChi = squaredChiTest(x, cantCells)
% 
%D = ksTest(u, cantCells)

% hold on;
% [F_k, X_k] = hist(x, cantCells);
% bar(X_k, F_k, 1, 'w');
% plot(-4:0.1:4, cantNums / 2.3 * myDensityFunction(-4:0.1:4), 'k');
% hold off;

aux = (max(x) - min(x)) / cantCells;
[F_k, X_k] = hist(x, cantCells);
hold on;
bar(X_k, F_k / cantNums, 1, 'w');
bar(X_k, myDensityFunction(X_k) * aux, 0.65, 'k');
hold off;

% sortedX = sort(x);
% theoreticalX = myDistribution((0.5:(cantNums-0.5))/200);
% plot(sortedX, theoreticalX, 'b.');

